package Java8_27;

public class Check {
    String name;
    String addess;

    public Check(String name){
        this.name=name;
    }

    public void check(Car c){
        System.out.println("检测启动，加速，刹车");
        if(c instanceof Daben){
            System.out.println("奔驰车正常");
        }else if(c instanceof Dazhong){
            System.out.println("大众车正常");
        }else if(c instanceof Wuling){
            System.out.println("五菱车正常");
        }

    }
}
